if exist "%~1_patched" del "%~1_patched"
xdelta3 -d -s "%~1" "Madou Monogatari I - Honoo no Sotsuenji EN [v1.0].xdelta" "%~1_patched"
if exist "Madou Monogatari I - Honoo no Sotsuenji EN [v1.0] 02.iso" del "Madou Monogatari I - Honoo no Sotsuenji EN [v1.0] 02.iso"
move "%~1_patched" "Madou Monogatari I - Honoo no Sotsuenji EN [v1.0] 02.iso"
set isofullname=%~n1
set isobase=%isofullname:~0,-2%
if not exist "Madou Monogatari I - Honoo no Sotsuenji EN [v1.0] 01.wav" copy "%isobase%01.wav" "Madou Monogatari I - Honoo no Sotsuenji EN [v1.0] 01.wav"
if not exist "Madou Monogatari I - Honoo no Sotsuenji EN [v1.0] 02.iso" copy "%isobase%02.iso" "Madou Monogatari I - Honoo no Sotsuenji EN [v1.0] 02.iso"
if not exist "Madou Monogatari I - Honoo no Sotsuenji EN [v1.0] 03.wav" copy "%isobase%03.wav" "Madou Monogatari I - Honoo no Sotsuenji EN [v1.0] 03.wav"
if not exist "Madou Monogatari I - Honoo no Sotsuenji EN [v1.0] 04.wav" copy "%isobase%04.wav" "Madou Monogatari I - Honoo no Sotsuenji EN [v1.0] 04.wav"
if not exist "Madou Monogatari I - Honoo no Sotsuenji EN [v1.0] 05.wav" copy "%isobase%05.wav" "Madou Monogatari I - Honoo no Sotsuenji EN [v1.0] 05.wav"
if not exist "Madou Monogatari I - Honoo no Sotsuenji EN [v1.0] 06.wav" copy "%isobase%06.wav" "Madou Monogatari I - Honoo no Sotsuenji EN [v1.0] 06.wav"
if not exist "Madou Monogatari I - Honoo no Sotsuenji EN [v1.0] 07.wav" copy "%isobase%07.wav" "Madou Monogatari I - Honoo no Sotsuenji EN [v1.0] 07.wav"
if not exist "Madou Monogatari I - Honoo no Sotsuenji EN [v1.0] 08.wav" copy "%isobase%08.wav" "Madou Monogatari I - Honoo no Sotsuenji EN [v1.0] 08.wav"
if not exist "Madou Monogatari I - Honoo no Sotsuenji EN [v1.0] 09.wav" copy "%isobase%09.wav" "Madou Monogatari I - Honoo no Sotsuenji EN [v1.0] 09.wav"
if not exist "Madou Monogatari I - Honoo no Sotsuenji EN [v1.0] 10.wav" copy "%isobase%10.wav" "Madou Monogatari I - Honoo no Sotsuenji EN [v1.0] 10.wav"
if not exist "Madou Monogatari I - Honoo no Sotsuenji EN [v1.0] 11.wav" copy "%isobase%11.wav" "Madou Monogatari I - Honoo no Sotsuenji EN [v1.0] 11.wav"
if not exist "Madou Monogatari I - Honoo no Sotsuenji EN [v1.0] 12.wav" copy "%isobase%12.wav" "Madou Monogatari I - Honoo no Sotsuenji EN [v1.0] 12.wav"
if not exist "Madou Monogatari I - Honoo no Sotsuenji EN [v1.0] 13.wav" copy "%isobase%13.wav" "Madou Monogatari I - Honoo no Sotsuenji EN [v1.0] 13.wav"
if not exist "Madou Monogatari I - Honoo no Sotsuenji EN [v1.0] 14.wav" copy "%isobase%14.wav" "Madou Monogatari I - Honoo no Sotsuenji EN [v1.0] 14.wav"
if not exist "Madou Monogatari I - Honoo no Sotsuenji EN [v1.0] 15.wav" copy "%isobase%15.wav" "Madou Monogatari I - Honoo no Sotsuenji EN [v1.0] 15.wav"
if not exist "Madou Monogatari I - Honoo no Sotsuenji EN [v1.0] 16.wav" copy "%isobase%16.wav" "Madou Monogatari I - Honoo no Sotsuenji EN [v1.0] 16.wav"
if not exist "Madou Monogatari I - Honoo no Sotsuenji EN [v1.0] 17.wav" copy "%isobase%17.wav" "Madou Monogatari I - Honoo no Sotsuenji EN [v1.0] 17.wav"
if not exist "Madou Monogatari I - Honoo no Sotsuenji EN [v1.0] 18.wav" copy "%isobase%18.wav" "Madou Monogatari I - Honoo no Sotsuenji EN [v1.0] 18.wav"
if not exist "Madou Monogatari I - Honoo no Sotsuenji EN [v1.0] 19.wav" copy "%isobase%19.wav" "Madou Monogatari I - Honoo no Sotsuenji EN [v1.0] 19.wav"
if not exist "Madou Monogatari I - Honoo no Sotsuenji EN [v1.0] 20.wav" copy "%isobase%20.wav" "Madou Monogatari I - Honoo no Sotsuenji EN [v1.0] 20.wav"
if not exist "Madou Monogatari I - Honoo no Sotsuenji EN [v1.0] 21.wav" copy "%isobase%21.wav" "Madou Monogatari I - Honoo no Sotsuenji EN [v1.0] 21.wav"
if not exist "Madou Monogatari I - Honoo no Sotsuenji EN [v1.0] 22.wav" copy "%isobase%22.wav" "Madou Monogatari I - Honoo no Sotsuenji EN [v1.0] 22.wav"
if not exist "Madou Monogatari I - Honoo no Sotsuenji EN [v1.0] 23.wav" copy "%isobase%23.wav" "Madou Monogatari I - Honoo no Sotsuenji EN [v1.0] 23.wav"
if not exist "Madou Monogatari I - Honoo no Sotsuenji EN [v1.0] 24.wav" copy "%isobase%24.wav" "Madou Monogatari I - Honoo no Sotsuenji EN [v1.0] 24.wav"
if not exist "Madou Monogatari I - Honoo no Sotsuenji EN [v1.0] 25.wav" copy "%isobase%25.wav" "Madou Monogatari I - Honoo no Sotsuenji EN [v1.0] 25.wav"
if not exist "Madou Monogatari I - Honoo no Sotsuenji EN [v1.0] 26.wav" copy "%isobase%26.wav" "Madou Monogatari I - Honoo no Sotsuenji EN [v1.0] 26.wav"
if not exist "Madou Monogatari I - Honoo no Sotsuenji EN [v1.0] 27.wav" copy "%isobase%27.wav" "Madou Monogatari I - Honoo no Sotsuenji EN [v1.0] 27.wav"
if not exist "Madou Monogatari I - Honoo no Sotsuenji EN [v1.0] 28.wav" copy "%isobase%28.wav" "Madou Monogatari I - Honoo no Sotsuenji EN [v1.0] 28.wav"
if not exist "Madou Monogatari I - Honoo no Sotsuenji EN [v1.0] 29.wav" copy "%isobase%29.wav" "Madou Monogatari I - Honoo no Sotsuenji EN [v1.0] 29.wav"
if not exist "Madou Monogatari I - Honoo no Sotsuenji EN [v1.0] 30.wav" copy "%isobase%30.wav" "Madou Monogatari I - Honoo no Sotsuenji EN [v1.0] 30.wav"
if not exist "Madou Monogatari I - Honoo no Sotsuenji EN [v1.0] 31.wav" copy "%isobase%31.wav" "Madou Monogatari I - Honoo no Sotsuenji EN [v1.0] 31.wav"
